package com.example.businesscalender;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;



public class SearchEvent extends Activity {
	
	Cursor c;
	private EditText text;
	private Button select_search;
	String text1;
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.searchevent);
        text=(EditText)findViewById(R.id.data1);
       
        ArrayAdapter<CharSequence> adapter1 = ArrayAdapter.createFromResource(
                this, R.array.databse_list, android.R.layout.simple_spinner_item);
        adapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        
        
       
        select_search=(Button)this.findViewById(R.id.selectsearch);
        select_search.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				
				// TODO Auto-generated method stub
				 text1=text.getText().toString();
				Intent i=new Intent(SearchEvent.this,ShowSearch.class);
				//i.putExtra("select1", select1 );
				i.putExtra("text1", text1);
				//System.out.println("text1111111"+select1);
				//System.out.println("text1111111"+text1);
				startActivity(i);
			}
		});
        
       // Toast.makeText(this, "select"+select1, Toast.LENGTH_SHORT).show();
       // Toast.makeText(this, "text1"+text1, Toast.LENGTH_SHORT).show();
       
	}
	
	

}
